/*******************************************************************************
* Project: QSAR(Cute Software Architecture) 
*
* Copyright: Copyright(C) 2024 by YuetingBen, All Rights Reserved
*
* File name: AppDiag.c
*
* Brief: ;
*
* Author: Yueting.Ben
*
* Module: AppDiag
*
* Revision:
* --------------------------------------------------------------------------------
* v0.1: 
* --Yueting.Ben, 2024-03-21 
* --Initial release

**********************************************************************************/

/** HEADER FILES **/
#include "AppDiag.h"


/** MACRO DEFINITION **/


/** TYPEDEF DEFINITION **/


/** LOCAL DATA DECLARATION **/


/** GLOBAL DATA DECLARATION **/


/** LOCAL FUNCTION DECLARATION **/


/** GLOBAL FUNCTION DECLARATION **/
Std_ReturnType AppDiag_Security_Level1_GetSeed(
    Dcm_OpStatusType OpStatus,
    uint8* Seed,
    Dcm_NegativeResponseCodeType* ErrorCode
);

Std_ReturnType AppDiag_Security_Level1_CompareKey(
    const uint8* Key,
    Dcm_OpStatusType OpStatus,
    Dcm_NegativeResponseCodeType* ErrorCode
);

Std_ReturnType AppDiag_DID_F190_VIN_Data_ReadData(
    uint8* Data
);

Std_ReturnType AppDiag_DID_F190_VIN_Data_WriteData(
    uint8* Data
);

/** LOCAL DATA **/
static uint8 vin[17] = "1234567890ABCDEFG";

/** GLOBAL DATA **/


/** LOCAL FUNCTION **/


/** GLOBAL FUNCTION **/
Std_ReturnType AppDiag_Security_Level1_GetSeed(
    Dcm_OpStatusType OpStatus,
    uint8* Seed,
    Dcm_NegativeResponseCodeType* ErrorCode
)
{
    Std_ReturnType retVal = E_OK;
    
    Seed[0] = 0xA1;
    Seed[1] = 0xA2;
    Seed[2] = 0xA3;
    Seed[3] = 0xA4;
    
    return(retVal);
}


Std_ReturnType AppDiag_Security_Level1_CompareKey(
    const uint8* Key,
    Dcm_OpStatusType OpStatus,
    Dcm_NegativeResponseCodeType* ErrorCode
)
{
    Std_ReturnType retVal = E_OK;
    return(retVal);
}


Std_ReturnType AppDiag_DID_F190_VIN_Data_ReadData(
    uint8* Data
)
{
    Std_ReturnType retVal = E_OK;
    
    uint8 i;
    for(i = 0; i < 17; i++)
    {
        Data[i] = vin[i];
    }

    return(retVal);
}


Std_ReturnType AppDiag_DID_F190_VIN_Data_WriteData(
    uint8* Data
)
{
   Std_ReturnType retVal = E_OK;
   
    uint8 i;
    for(i = 0; i < 17; i++)
    {
        vin[i] = Data[i];
    }
   return(retVal);
}


